<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客管理</title>
    <link rel="stylesheet" th:href="@{/css/semantic.min.css}">
    <link rel="stylesheet" th:href="@{/css/me.css}">
</head>
<body>

<!--导航-->
<nav th:replace="~{adfragement :: nav_top(2)}" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
</nav>


<!--中间内容-->
<div  class="m-container-small m-padded-tb-big">
    <div class="ui container">
        <table class="ui celled table">
            <p th:text="${msg}" style="color: red"></p>
            <thead>
            <tr>
                <th></th>
                <th>分类名称</th>
                <th>       </th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="type,iterStat: ${typePages.content}">
                <td th:text="${iterStat.count}">1</td>
                <td th:text="${type.name}">刻意练习清单</td>
                <td>
                    <a th:href="@{/admin/type/edit/{id}(id=${type.id})}" href="#" class="ui  teal basic button">编辑</a>
                    <a th:href="@{/admin/type/delete/{id}(id=${type.id})}" href="#" class="ui  red basic button">删除</a>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <th colspan="6">
                    <div class="ui mini pagination menu">
                        <a class=" item" th:href="@{/admin/type/(page=${typePages.number}-1)}"  th:if="${typePages.number}>0">上一页</a>
                        <a class=" item" th:href="@{/admin/type/(page=${typePages.number}+1)}" th:if="${typePages.number}<${typePages.totalPages}-1">下一页</a>
                    </div>
                    <a th:href="@{/admin/type/add}" href="#" class="ui mini right floated teal basic button">新增</a>
                </th>
            </tr>
            </tfoot>
        </table>
    </div>
</div>

<br>
<br>
<!--底部footer-->
<footer th:replace="~{adfragement :: last_nav}" class="ui inverted vertical segment m-padded-tb-massive">
</footer>


<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script th:src="@{/js/semantic.min.js}" src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on : 'hover'
    });

</script>
</body>
</html>